﻿// (c) Copyright 2013 Mike Riedel.
// This source is subject to the Microsoft Public License (Ms-PL).
// All other rights reserved.

namespace System.Diagnostics
{
   /// <summary>
   /// A base-bones version of the .NET Trace class that does just enough to allow
   /// the same code to build on both platforms.
   /// </summary>
   public static class Trace
   {
      /// <summary>
      /// Writes an error message.
      /// </summary>
      [Conditional("TRACE")]
      public static void TraceError(string format, params object[] args)
      {
         Debug.WriteLine("Error:" + format, args);
      }

      /// <summary>
      /// Writes an informational message.
      /// </summary>
      [Conditional("TRACE")]
      public static void TraceInformation(string format, params object[] args)
      {
         Debug.WriteLine("Info: " + format, args);
      }

      /// <summary>
      /// Writes a warning message.
      /// </summary>
      [Conditional("TRACE")]
      public static void TraceWarning(string format, params object[] args)
      {
         Debug.WriteLine("Warning: " + format, args);
      }
   }
}
